import request from "./requests";

export const refreshTokens = (data) => {
  return request({
    url: "/api/apis/refreshTokens",
    data: data,
  });
}
export const login = (data) => {
  return request({
    url: "/api/apis/login",
    data: data,
  });
}
//註冊用戶
export const registerUser = (data) => {
  return request({
    url: "/api/apis/registerUser",
    data: data,
  });
}

//重置密碼申請
export const resetPsd = (data) => {
  return request({
    url: "/api/apis/resetPsd",
    data: data,
  });
}
//獲取用戶信息
export const getMemberInfo = (data) => {
  return request({
    url: "/api/apict/getMemberInfo",
    data: data,
  });
}

//修改用戶權限
export const editorUserAuth = (data) => {
  return request({
    url: "/api/apict/editorUserAuth",
    data: data,
  });
}


//申請其他公司
export const registerOtherCompany = (data) => {
  return request({
    url: "/api/apict/registerOtherCompany",
    data: data,
  });
}


//獲取文件列表
export const getFileList = (data) => {
  return request({
    url: "/api/apict/getFileList",
    data: data,
  });
}

//獲取用戶列表
export const getUserList = (data) => {
  return request({
    url: "/api/apict/getUserList",
    data: data,
  });
}
//設置用戶權限
export const setUserAuth = (data) => {
  return request({
    url: "/api/apict/setUser",
    data: data,
  });
}
//獲取用戶所有的公司信息
export const getCompanyByUserEmail = (data) => {
  return request({
    url: "/api/apict/getCompanyByUserEmail",
    data: data,
  });
}
//專案列表
export const getCaselist = (data) => {
  return request({
    url: "/api/apict/getCaselist",
    data: data,
  });
}
//專案詳情
export const getCaseDetail = (data) => {
  return request({
    url: "/api/apict/getCaseDetail",
    data: data,
  });
}

//摘要詳情
export const getCasezyDetail = (data) => {
  return request({
    url: "/api/apict/getCasezyDetail",
    data: data,
  });
}
//任務詳情
export const getTaskDetail = (data) => {
  return request({
    url: "/api/apict/getTaskDetail",
    data: data,
  });
}
//刪除專案
export const delCase = (data) => {
  return request({
    url: "/api/apict/delCase",
    data: data,
  });
}
//刪除摘要
export const delCasezy = (data) => {
  return request({
    url: "/api/apict/delCasezy",
    data: data,
  });
}

//刪除任務
export const delTask = (data) => {
  return request({
    url: "/api/apict/delTask",
    data: data,
  });
}
//刪除用戶
export const delUser = (data) => {
  return request({
    url: "/api/apict/delUser",
    data: data,
  });
}
//專案總進度
export const getCaseProgress = (data) => {
  return request({
    url: "/api/apict/getCaseProgress",
    data: data,
  });
}

//摘要總進度
export const getCasezyProgress = (data) => {
  return request({
    url: "/api/apict/getCasezyProgress",
    data: data,
  });
}
//專案摘要列表
export const getCasezylist = (data) => {
  return request({
    url: "/api/apict/getCasezylist",
    data: data,
  });
}
//任務列表
export const getTasklist = (data) => {
  return request({
    url: "/api/apict/getTasklist",
    data: data,
  });
}
//新增專案摘要
export const addCasezy = (data) => {
  return request({
    url: "/api/apict/addCasezy",
    data: data,
  });
}
//新增專案
export const addCase = (data) => {
  return request({
    url: "/api/apict/addCase",
    data: data,
  });
}

//新增任務
export const addTasks = (data) => {
  return request({
    url: "/api/apict/addTasks",
    data: data,
  });
}
//新增任務日誌
export const addTasksLog = (data) => {
  return request({
    url: "/api/apict/addTasksLog",
    data: data,
  });
}
//更新任務日誌
export const updateTasksLog = (data) => {
  return request({
    url: "/api/apict/updateTasksLog",
    data: data,
  });
}
//獲取專案下面的所有任務
export const getCaseAllTaskList = (data) => {
  return request({
    url: "/api/apict/getCaseAllTaskList",
    data: data,
  });
}
//獲取前置任務進度
export const getTaskProgressById = (data) => {
  return request({
    url: "/api/apict/getTaskProgressById",
    data: data,
  });
}

//將用戶添加或刪除專案
export const inOutCaseForUser = (data) => {
  return request({
    url: "/api/apict/inOutCaseForUser",
    data: data,
  });
}
//將用戶添加或刪除專案
export const inOutCaseForUserNew = (data) => {
  return request({
    url: "/api/apict/inOutCaseForUserNew",
    data: data,
  });
}

//獲取日誌列表
export const getTaskLoglist = (data) => {
  return request({
    url: "/api/apict/getTaskLoglist",
    data: data,
  });
}

//刪除日誌
export const delLog = (data) => {
  return request({
    url: "/api/apict/deleteTasksLog",
    data: data,
  });
}
//獲取日誌詳情
export const getLogDetail = (data) => {
  return request({
    url: "/api/apict/getLogDetail",
    data: data,
  });
}

//提交留言
export const subMessages = (data) => {
  return request({
    url: "/api/apict/subMessages",
    data: data,
  });
}

//留言列表
export const getMessagelist = (data) => {
  return request({
    url: "/api/apict/getMessagelist",
    data: data,
  });
}
//將未讀改為已讀
export const changeMessageStatus = (data) => {
  return request({
    url: "/api/apict/changeMessageStatus",
    data: data,
  });
}
//getpdf
export const getPdf = (data) => {
  return request({
    url: "/api/apict/getPdf",
    data: data,
  });
}
//getCaseName
export const getCaseName = (data) => {
  return request({
    url: "/api/apict/getCaseName",
    data: data,
  });
}

//delFiles
export const delFiles = (data) => {
  return request({
    url: "/api/apict/delFiles",
    data: data,
  });
}
//圖片上傳
export const upimage = (data) => {
  return request({
    url: "/api/apict/uploadfile",
    data: data,
  });
}
// 视频鉴权

export const getVideoAuths = (data) => {
  return request({
    url: "/api/apict/getVideoAuths",
    data: data,
  });
}
//視頻列表
export const getVideolist = (data) => {
  return request({
    url: "/api/apict/getVideolist",
    data: data,
  });
}
//獲取視頻播放地址
export const getVideoUrl = (data) => {
  return request({
    url: "/api/apict/getVideoUrl",
    data: data,
  });
}
//獲取專案用戶列表
export const getCaseUserlist = (data) => {
  return request({
    url: "/api/apict/getCaseUserlist",
    data: data,
  });
}
//獲取專案用戶視頻權限
export const getCaseUserIdent = (data) => {
  return request({
    url: "/api/apict/getCaseUserIdent",
    data: data,
  });
}
//更新授權
export const updateAuth = (data) => {
  return request({
    url: "/api/apict/updateAuth",
    data: data,
  });
}

//更新授權
export const getPlaybackList = (data) => {
  return request({
    url: "/api/apict/getPlaybackList",
    data: data,
  });
}

export const refreshVideoToken = (data) => {
  return request({
    url: "/api/apict/refreshVideoToken",
    data: data,
  });
}

export const saveVideoPic = (data) => {
  return request({
    url: "/api/apict/saveVideoPic",
    data: data,
  });
}
export const getCasePicslist = (data) => {
  return request({
    url: "/api/apict/getCasePicslist",
    data: data,
  });
}
export const bindDeviceToCase = (data) => {
  return request({
    url: "/api/apict/bindDeviceToCase",
    data: data,
  });
}

export const delDeviceById = (data) => {
  return request({
    url: "/api/apict/delDeviceById",
    data: data,
  });
}

export const getnetworkcameraid = (data) => {
  return request({
    url: "/api/apict/getnetworkcameraid",
    data: data,
  });
}

// 生成pdf
export const generateTaskLogPdfFiile = (data) => {
  return request({
    url: "/api/apict/generateTaskLogPdfFiile",
    data: data,
  });
}

//修改工程分项的排序
export const updateCasezySort = (data) => {
  return request({
    url: "/api/apict/modifyCaseZySortNumber",
    data: data,
  });
}

//根据工程ID查询分项下拉
export const getCasezyByCaseId = (data) => {
  return request({
    url: "/api/apict/getCaseZyOptionsByCaseId",
    data: data,
  });
}

//通过工程子项查询任务的下拉数据
export const getTaskByCasezyId = (data) => {
  return request({
    url: "/api/task/getTaskOptionsByCasezyId",
    data: data,
  });
}

// 复制专案
export const copyCase = (data) => {
  return request({
    url: "/api/api_case/copyCase",
    data: data,
  });
}

//下載excel
export const downloadExcel = (data) => {
  return request({
    url: "/api/api_case/exportCaseInfoExcel",
    data: data,
  });
}

// 根据专案的ID获取花费的list
export const getCaseCostList = (data) => {
  return request({
    url: "/api/api_case/getCostList",
    data: data,
  });
}





